1. Field of Invention
The present invention relates to a method of dynamically adjusting the number of task requests, and more particularly to a method of dynamically adjusting the number of task requests through the sum of the access data volume of temporarily stored task requests currently.
2. Related Art
The Internet Small Computer System Interface (iSCSI) protocol (RFC3720) is a protocol for storage devices using the Internet to transmit SCSI instructions to perform read and write. Two terminals employing the iSCSI protocol to communicate with other are referred to as an initiator and a target, respectively. The initiator is used to send a task request with SCSI instructions to the target. The target receives the task request, accesses the storage device, and transmits an access result to the initiator after the SCSI instructions are executed. In the iSCSI protocol, the initiator may send a plurality of tasks to the target simultaneously, and the target may temporarily store the received plurality of tasks in a queue to wait for process, thereby enhancing utilization of the Internet and execution efficiency of the initiator and the target.
However, if the initiator fails to well control the total number of the task requests simultaneously transmitted to the target, the target uses up resources after receiving so many task requests. At this time, if the initiator continues to transmit a task request to the target, the task request will be lost or a system becomes abnormal. Therefore, the initiator cannot continue to transmit a task request until the task requests temporarily stored in the target are reduced to having resources. Such a process is called a “flow control.” That is, the flow control of the iSCSI protocol is to control the frequency of transmitting the task requests from the initiator to the target in the iSCSI protocol, i.e., the number of the task requests that are allowed be transmitted to the target within a certain period of time.
In fact, the flow control of the iSCSI protocol is restricted by the speed of the target processing the task requests. The speed of processing the task requests is influenced by many aspects, mainly including a memory, network bandwidth, computation capability of a processor, and the accessing performance of a storage medium. The greater the memory is, the more the temporarily stored task requests are; the wider the network bandwidth is, the more the data volume transmitted back per unit time is; the better the computation capability of the processor is, the greater the processing speed of the task requests is; and the higher the accessing performance the storage media is, the shorter the time for reading and writing the task requests on the storage medium is. However, currently, the access speed of the storage media cannot satisfy the capacity of the memory, the computation capability of the processor, and the broadband of the network, so the most significant factor affecting the flow control is the accessing performance of the storage media. Since the access speed of the storage media is a fixed value during a specific time period, the critical factor affecting the stability of the accessing performance lies in the amount of the access data volume. In spite of that, the conventional flow control is merely directed to the memory, the processor, and the bandwidth, and it is obvious that the conventional flow control is not directed to the portion which actually causes the bottle-neck of the flow, i.e., the performance of the storage media. Therefore, it has become a problem urgently to be solved that how to provide a function of adjusting the number of the task requests that may be further received according to the performance of the storage media.